home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Libris Britannia 4
/
science library(b).zip
/
science library(b)
/
DJGPP
/
DJ111M2.ZIP
/
tests
/
t17.c
< prev
Wrap
C/C++ Source or Header
|
1994-01-08
|
337b
|
26 lines
#include <stdio.h>
void test(const char *);
const char *s1="1";
const char *s2="1/2";
const char *s3="1/2/3";
const char *s4="1/2/3/4";
main()
{
test(s1);
test(s2);
test(s3);
test(s4);
}
void test(const char *s)
{
int a;
printf("%d\n", sscanf(s, "%d/%d/%d/%d", &a, &a, &a, &a));
}